form method = 'get'
  .well
	|销售日期：
	- if params[:check]
	  input type="text" data-behaviour='datepicker' name='start' value=params[:start] 
	  |至
	  input type="text" data-behaviour='datepicker' name='end' value=params[:end]
	- else 
	  input type="text" data-behaviour='datepicker' name='start' value=@start 
	  |至
	  input type="text" data-behaviour='datepicker' name='end' value=@end
	button type='submit' name='check' 查询
  
  .panel.panel-default
    .panel-heading

    .panel-body
		.table-responsive
	      table.table.table-bordered.table-hover
	        tr
	          th 销售日期
	          th 配件编号
	          th 配件名称
	          th 数量
	          th 单位
	          th 销售金额
	          th 成本
	          th 毛利润
	          th 毛利率（%）
	          
	        -@part_salse_details.each do |p|
	          tr
	            td = p.created_at.strftime('%Y-%m-%d')
	            td = p.part.code
	            td = p.part.name
	            td = p.qty
	            td = p.part.unit
	            td = p.sub_total
	            td 
	            td
	            td
	            

javascript:
  $(document).on("focus", "[data-behaviour~='datepicker']", function(e){
    $(this).datepicker({"format": "yyyy-mm-dd", "weekStart": 1, "autoclose": true, "language": "zh-CN", "todayHighlight": true});
  });

		            